<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .ani{
            width: 100px;
            position: relative;
            text-align: center;
        }

        .ani::after{
            content: '';
            height: 4px;
            position: absolute;
            background-color: rgb(31, 185, 246);;
            left: 50%;
            right: 50%;
            bottom: -4px;
            transition: left .5s, right .5s;
        }

        .ani:hover::after{
            left: 0;
            right: 0;
        }
    </style>
</head>
<body>
    <div class="ani">
        点击进入主页
    </div>
</body>
</html>